﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace BLL
{
    public class Illegal
    {
        public Illegal() { }
        private readonly Aliyeye.Car.Net.Dal.Illegal dal = new Aliyeye.Car.Net.Dal.Illegal();
        public int Add(Model.Illegal model)
        {
            return dal.Add(model);
        }
        public bool Update(Model.Illegal model)
        {
            return dal.Update(model);
        }
        public bool Delete(int Id)
        {
            return dal.Delete(Id);
        }
        public Model.Illegal GetModel(int Id)
        {
            return dal.GetModel(Id);
        }
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        /// <summary>
        /// 还车结算时，统计车辆违章价格总计
        /// </summary>
        /// <param name="carCode"></param>
        /// <param name="beginTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        public decimal GetSumPriceByCarCode(string carCode, DateTime beginTime, DateTime endTime)
        {
            return dal.GetSumPriceByCarCode(carCode, beginTime, endTime);
        }

        /// <summary>
        /// 还车结算时，统计违章的ID
        /// </summary>
        /// <param name="carCode"></param>
        /// <param name="beginTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        public DataSet GetKeysByCarCode(string carCode, DateTime beginTime, DateTime endTime)
        {
            return dal.GetKeysByCarCode(carCode, beginTime, endTime);
        }

        /// <summary>
        /// 还车结算时，更改已经结算的状态
        /// </summary>
        /// <param name="carCode"></param>
        /// <param name="beginTime"></param>
        /// <param name="endTime"></param>
        /// <returns></returns>
        public bool GetUpdateStatusByKeysByCarCode(string carCode, DateTime beginTime, DateTime endTime, string ids)
        {
            return dal.GetUpdateStatusByKeysByCarCode(carCode, beginTime, endTime, ids);
        }


    }
}
